| Description | : Given a request with a user’s location and a partial query that serves as the prefix of a full query string (referred to as a query prefix), the Azure Maps Autocomplete API returns a list of suggested entities that the user is most likely searching for. These entities are ranked from most to least likely. >[!Important] >By using this feature, you agree to the preview legal terms. For more information, see [Preview Supplemental Terms](https://azure.microsoft.com/en-us/support/legal/preview-supplemental-terms/). |
| Reference | : Link ¶ |
⚶ Changes
{
"#id": "Search_GetGeocodeAutocomplete",
"$parameters": [
{
"#name": "coordinates",
"Description": {
"new": "Required when `bbox` is not provided. A point on the earth specified as a longitude and latitude. When you specify this parameter, the user\u2019s location is taken into account and the results returned may be more relevant to the user. Example: &coordinates=lon,lat\n\n**Note:** `coordinates` becomes a secondary signal if `bbox` is provided.",
"old": "A point on the earth specified as a longitude and latitude. When you specify this parameter, the user\u2019s location is taken into account and the results returned may be more relevant to the user. Example: &coordinates=lon,lat"
}
},
{
"#name": "bbox",
"Description": {
"new": "Required when `coordinates` is not provided. A rectangular area on the earth defined as a bounding box object. The sides of the rectangle are defined by longitude and latitude values. When you specify this parameter, the geographical area is taken into account when computing the results of a location query.\n\nExample: lon1,lat1,lon2,lat2.\n\nMinimum size: approximately 0.00001 degrees (~0.01 meters).\n\n Maximum size: up to the full global extent (-180,-90 to 180,90)",
"old": "A rectangular area on the earth defined as a bounding box object. The sides of the rectangle are defined by longitude and latitude values. When you specify this parameter, the geographical area is taken into account when computing the results of a location query.\n\nExample: lon1,lat1,lon2,lat2.\n\nMinimum size: approximately 0.00001 degrees (~0.01 meters).\n\n Maximum size: up to the full global extent (-180,-90 to 180,90)"
}
}
]
}
⚼ Request
GET:
/geocode:autocomplete
{
x-ms-client-id:
string
,
Accept-Language:
string
,
api-version:
string
,
query:
string
,
coordinates:
array
,
bbox:
array
,
top:
integer
,
resultTypeGroups:
array
,
resultTypes:
array
,
view:
string
,
countryRegion:
string
,
}
⚐ Response (200)
{
$headers:
{
,
x-ms-request-id:
string
,
}
$schema:
}
{
,
type:
enum
,
features:
[
]
,
{
,
type:
enum
,
geometry:
object
,
properties:
}
{
,
typeGroup:
enum
,
type:
enum
,
address:
{
,
addressLine:
string
,
locality:
string
,
neighborhood:
string
,
adminDistricts:
[
]
,
{
,
name:
string
,
shortName:
string
,
}
postalCode:
string
,
countryRegion:
{
,
ISO:
string
,
name:
string
,
}
formattedAddress:
string
,
streetName:
string
,
streetNumber:
string
,
intersection:
}
{
,
baseStreet:
string
,
secondaryStreet1:
string
,
secondaryStreet2:
string
,
intersectionType:
string
,
displayName:
string
,
}
name:
string
,
}
nextLink:
string
,
}
⚐ Response (default)
{
error:
}
{
,
code:
string
,
message:
string
,
target:
string
,
details:
[
,
string
,
]
additionalInfo:
}
[
]
,
{
,
type:
string
,
info:
object
,
}